const webpack = require('webpack')
module.exports = {
  chainWebpack: config => {
    config
      .plugin('html')
      .tap(args => {
        args[0].title = '评价系统'
        return args
      })
  },
  publicPath: './',
  outputDir: 'dist',   //build输出目录
  assetsDir: 'assets', //静态资源目录（js, css, img）
  lintOnSave: false, //是否开启eslint
  configureWebpack: {
    plugins: [
      new webpack.ProvidePlugin({
        $: "jquery",
        jQuery: "jquery",
        "windows.jQuery": "jquery"
      })
    ]
  },
  devServer: {
    open: true, //是否自动弹出浏览器页面
    // host: "192.168.1.12",
    host: "localhost",
    port: '8006',
    https: false,
    hotOnly: false,
    // proxy: {
    //   "/api": {
    //     target: "https://www.baoxue.online",//目标主机 
    //     changeOrigin: true,//需要虚拟主机站点 
    //     pathRewrite: {   //重写路径 比如'/api/aaa/ccc'重写为'/aaa/ccc'
    //       '^/api': ''
    //     }
    //   }
    // }


  }
}